<style type="text/css">
    .materiel {
        max-width: 400px;
        float: left;
        margin-right: 1%;
    }
</style>
<div class="layui-form-item materiel" pane="">
    <label class="layui-form-label">物料类型</label>
    <div class="layui-input-block">
        <input type="radio" name="type" value="0" lay-filter="type" title="测试户"
               @if($materiels->type == 0) checked @endif>
        <input type="radio" name="type" value="1" lay-filter="type" title="正式户"
               @if($materiels->type == 1) checked @endif>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label">物料名称</label>
    <div class="layui-input-block">
        <input type="text" name="name" lay-verify="required" autocomplete="off" value="{{$materiels->name}}"
               placeholder="请输入物料名称" class="layui-input">
    </div>
    <div class="layui-form-mid layui-word-aux">设置账户单元分类区分</div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label">外显号码</label>
    <div class="layui-input-block">
        <input type="text" name="overt_phone" lay-verify="required|OPhone" autocomplete="off"
               value="{{$materiels->overt_phone}}" placeholder="请输入外显号码" class="layui-input">
    </div>
    <div class="layui-form-mid layui-word-aux">设置外呼系统拨打给访客显示的座机号码，手机号和400电话当前不可使用</div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label">坐席号码</label>
    <div class="layui-input-block">
        <input type="text" name="seat_phone" lay-verify="required|SPhone" autocomplete="off"
               value="{{$materiels->seat_phone}}" placeholder="请输入外显号码" class="layui-input">
    </div>
    <div class="layui-form-mid layui-word-aux">设置外呼系统拨打给咨询客服人员显示的号码，手机号和座机号都可使用</div>
</div>
<div class="layui-form-item">
    <div class="layui-inline">
        <label class="layui-form-label">年龄范围</label>
        <div class="layui-input-inline" style="width: 100px;">
            <input type="text" name="min_age" lay-verify="required|number" placeholder="最小年龄"
                   value="{{$materiels->min_age}}" autocomplete="off"
                   class="layui-input">
        </div>
        <div class="layui-form-mid">-</div>
        <div class="layui-input-inline" style="width: 100px;">
            <input type="text" name="max_age" lay-verify="required|number" placeholder="最大年龄"
                   value="{{$materiels->max_age}}" autocomplete="off"
                   class="layui-input">
        </div>
        <div class="layui-form-mid layui-word-aux">设置获取访客的年龄范围</div>
    </div>
</div>
<div class="layui-form-item" pane="">
    <label class="layui-form-label">性别</label>
    <div class="layui-input-block">
        <input type="radio" name="sex" value="0" title="不限" @if($materiels->sex == 0) checked @endif>
        <input type="radio" name="sex" value="1" title="男" @if($materiels->sex == 1) checked @endif>
        <input type="radio" name="sex" value="2" title="女" @if($materiels->sex == 2) checked @endif>
    </div>
</div>

<div class="layui-form-item" id="region">
    <label class="layui-form-label">获取区域</label>
    <div class="layui-input-inline">
        <select name="province" lay-verify="required" lay-filter="province" id="province"></select>
    </div>
    <div class="layui-input-inline">
        <select name="city" lay-verify="required" lay-filter="city" id="city"></select>
    </div>
    <div class="layui-form-mid layui-word-aux">设置获取访客的地区范围</div>
</div>

<div class="layui-form-item @if($materiels->type == 0) materiel_upload @endif">
    <div class="layui-upload">
        <button type="button" class="layui-btn" id="licenseUpload">上传营业执照</button>
        <button class="layui-btn layui-btn-danger layui-btn-xs">查看模板</button>
        <div class="layui-word-aux">选择正式户此选项为必填</div>
        <div class="layui-upload-list">
            @if(empty($materiels->license))
                <img class="layui-upload-img" src="{{asset('images/default.jpg')}}" id="license">
            @else
                <img class="layui-upload-img" src="{{$materiels->license}}" id="license">
            @endif
            <p id="licenseText">
        </div>
    </div>
    <div class="layui-upload">
        <button type="button" class="layui-btn" id="reportUpload">上传报备单</button>
        <button class="layui-btn layui-btn-danger layui-btn-xs">查看模板</button>
        <div class="layui-word-aux">选择正式户此选项为必填</div>
        <div class="layui-upload-list">
            @if(empty($materiels->report))
                <img class="layui-upload-img" src="{{asset('images/default.jpg')}}" id="report">
            @else
                <img class="layui-upload-img" src="{{$materiels->report}}" id="report">
            @endif
            <p id="reportText"></p>
        </div>
    </div>
</div>
<div class="layui-form-item">
    <button class="layui-btn" lay-submit="" lay-filter="submitMateriel">提交物料</button>
</div>
